//
//  SourceViewController.m
//  Today
//
//  Created by dllo on 15/5/27.
//  Copyright (c) 2015年 fanfan. All rights reserved.
//

#import "SourceViewController.h"

@interface SourceViewController ()

@end

@implementation SourceViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    UIScrollView *scroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    scroll.backgroundColor = [UIColor colorWithRed:0.165 green:0.173 blue:0.384 alpha:1.000];
    scroll.contentOffset = CGPointMake(0, 0);
    scroll.showsHorizontalScrollIndicator = NO;
    scroll.showsVerticalScrollIndicator = NO;
    scroll.bounces = NO;
    UIImageView *imageview = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 250)];
    imageview.image = [UIImage imageNamed:@"星座♈️.jpg"];
    [scroll addSubview:imageview];
    
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 250, self.view.frame.size.width, 600)];
    label.text = @"  在遥远古希腊的大草原中，驰骋着一批半人半兽的族群，这是一个生性凶猛的族群。“半人半兽”代表着理性与非理性、人性与兽性间的矛盾挣扎，这就是“ 射手座”。人马族里唯独的一个例外——奇伦。奇伦虽也是人马族的一员，但生性善良，对待朋友尤以坦率著称，所以奇伦在族里十分受人尊敬，有一天，希腊最伟大的英雄——赫丘力，来拜访他的朋友，这位幼年即用双手扼死巨蛇的超级大力士，一听说人马族也是一个擅长酿酒的民族，想到香醇的佳酿，也不管这酒是人马族的共有财产，便强迫他的朋友偷来给他享用，否则就打死他，所有人都知道，赫丘力是世间最强壮的人，连太阳神阿波罗都得让他三分，迫于无奈，这个人马族人只有照着分的意思办了。 正当赫丘力沉醉在洒的芬芳甘醇之际，酒的香气早已弥漫了整个部落，所有人马族都厉声斥责赫丘力，赫丘力怒气冲天，拿着他的神弓奋力追杀人马族，人马族们仓皇的逃至最受人尊敬的族人——奇伦家中，这时奇伦在家中听见了屋外万蹄奔踏及惊慌的求救声，他连想都没想，开门直奔出去，说时迟那时快，赫丘力拉满弓瞬间射出去，竟然射中了奇伦的心脏，善良无辜的奇伦为朋友牺牲了自己的生命。天神宙斯听见了人马的嘶喊，於是他双手托起奇伦的尸体，往天空一掷，奇伦瞬间幻化成数颗闪耀的星星，形体就如人马族，从此为了纪念奇伦，这个星座就称为“射击手座” ";
    label.backgroundColor = [UIColor colorWithRed:0.165 green:0.173 blue:0.384 alpha:1.000];
    label.text = self.source;
    label.font = [UIFont systemFontOfSize:20];
    CGFloat height = [FloatTool getHeightWithFont:20.0 labelWidth:375.0 string:label.text];
    scroll.contentSize = CGSizeMake(self.view.frame.size.width , height + 250 + 64);
    label.numberOfLines = 2000;
    [label sizeToFit];
    [scroll addSubview:label];
    [self.view addSubview:scroll];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
